<?php
/**
 * Yii view form
 *
 * @author <KTD SOFT>
 * @since Jan 11, 2013 - 2:46:02 PM
 */
?>

<div class = "row-fluid">
    <?php
    $this->model->start_time = $this->model->start_time ? date('d-m-Y', $this->model->start_time) : date('d-m-Y', time());
    $this->model->end_time   = $this->model->end_time ? date('d-m-Y', $this->model->end_time) : date('d-m-Y', time());
    $this->beginWidget('MyActiveForm', array(
        'model'       => $this->model,
        'title'       => $this->pageTitle,
        'htmlOptions' => array('class' => 'span12'),
        'columns'     => array(
            array(
                'field' => 'coupon_code',
                'type'  => 'textField',
            ),
            array(
                'field'       => 'value',
                'type'        => 'textField',
                'placeholder' => 'Giá trị phải là số nguyên'
            ),
            array(
                'field'       => 'start_time',
                'type'        => 'textField',
                'htmlOptions' => array('class'    => "datepicker txt",
                    'readonly' => "readonly",
                ),
            ),
            array(
                'field'       => 'end_time',
                'type'        => 'textField',
                'htmlOptions' => array('class'    => "datepicker txt",
                    'readonly' => "readonly"),
            ),
        ),
    ));
    ?>

</div>
<?php $this->endWidget() ?>